package com.leqicheng.tenon.util;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;

public class VersionManagerUtil {

    /*
     * 获取当前程序的版本号
     */
    public static String getVersionName(Context mContext) throws Exception {
        PackageManager packageManager = mContext.getPackageManager();
        PackageInfo packInfo = packageManager.getPackageInfo(mContext.getPackageName(),
                0);
        return packInfo.versionName;
    }
}
